package com.shangxian.giveithome.controller;

import com.shangxian.giveithome.mapper.CarouselMapper;
import com.shangxian.giveithome.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Api("轮播图模块")
@RestController
@RequestMapping("/carousel")
public class CarouselController {
    @Autowired
    private CarouselMapper carouselMapper;


    @PostMapping("/selectAllCarousel")
    @ApiOperation(value = "查询所有轮播图")
    public Result findAllCarousel(){
        return Result.success(carouselMapper.findAllCarousel());
    }

    @PostMapping("selectEndCarousel")
    @ApiOperation(value ="查询已经结束展示的轮播图" )
    public Result selectEndCarousel(){
        return Result.success(carouselMapper.selectEndCarousel());
    }

//    @PostMapping("selectNotStartCarousel")
//    @ApiOperation(value ="查询未开始展示的轮播图" )

}
